<template>
	<view>
		<image src="/static/loading.gif" v-if="isload"></image>
		<shopForm v-else :goodsItem="updateReq" :inputType="inputType"></shopForm>
	</view>
</template>
<script>
	import store from '@/store/index.js'; //需要引入store
	import {
		patriarchShopItem
	} from '@/api/api.js'
	export default {
		data() {
			return {
				loading: "https://img.zcool.cn/community/0159625e4aaabea8012165181d6c7d.gif",
				updateReq: {},
				isload: true,
				inputType: "update",
			}
		},
		onLoad: function(options) {
			this.loadItem(options.shop_uuid)
		},
		methods: {
			loadItem(shopUUID) {
				patriarchShopItem(shopUUID).then(res => {
					console.log(res.data)
					if (res.data.code != 0) {
						uni.showToast({
							icon: "none",
							title: res.data.message
						})
					} else {
						this.updateReq = res.data.data
						this.isload = false
					}
				})
			},

		}
	}
</script>
